1 #include "Person.h"
2
3 Person::Person()
4 {
5     firstName =
" ";
6     lastName =
" ";
7     dateOfBirth =
1234;
8 }

9
10 string
Person::getLastName() const
11 {
12     
return lastName;
13 }

14
15 string
Person::getFirstName() const
16 {
17     
return firstName;
18 }

19
20 int
Person::getDateOfBirth() const
21 {
22     
return dateOfBirth;
23 }

24
25 void
Person::setName(const string& newLastName, const string& newFirstName)
26 {
27     firstName = newFirstName;
28     lastName = newLastName;
29 }

30
31 void
Person::setDateOfBirth(const int newDateOfBirth)
32 {
33     dateOfBirth = newDateOfBirth;
34 }

35
36 void
Person::printName() const
37 {
38     cout << lastName <<
", " << firstName << ' ';
39 }
40
41 Person::~Person()
42 {
43
44 }


Gõ tìm kiếm nhanh...